FIG. 1 shows an exemplary video encoding system 12 in which a sequence of frames are supplied from a video source 14. The sequence of frames may be progressive or interlaced. A progressive sequence may have a frame rate on the order of 30 frames per second with a single field in each frame. An interlaced sequence generally includes two fields in each frame and therefore will include 60 fields per second at a 30 frames per second frame rate. The interlaced sequence includes an even field corresponding to even scan lines and an odd field corresponding to odd scan lines.
The video source 14 may be any digital video signal source such as a video camera or a telecine machine. A conventional telecine machine converts film with a frame rate of 24 frames per second into a 60 field per second digital video signal using a 3:2 pulldown technique. The 3:2 pulldown technique generates two video fields for a given film frame, three video fields for the next film frame, two fields for the next frame and so on in an alternating 3,2,3,2,3,2, . . . pattern. For a film frame which is converted into three video fields, the third field is a repeat of the first field. The 3:2 pulldown technique is discussed in greater detail below in connection with FIG. 2.
The video encoding system 12 further includes a video capture buffer 16 for capturing the input video sequence and an inverse telecine circuit 18. The inverse telecine circuit 18 detects repeat fields in the input video sequence and causes these fields to be dropped so as not to waste valuable encoder resources on the compressing of repeat fields. The video encoding system 12 further includes an encoder 20 which may be an MPEG-1 or MPEG-2 compliant encoder. The encoder 20 includes a preprocessor buffer 22, a preprocessor 24, a video compression circuit 26, a rate buffer 28 and a controller 30.
The video compression circuit 26 receives a video signal from the preprocessor 24 in the form of a sequence of frames or fields and outputs a compressed digital video bit stream. The compressed digital video bit stream output by the video compression circuit 26 may comply with the syntax specified in video compression standards such as MPEG-1 or MPEG-2. Compression circuits which generate an MPEG-1 or MPEG-2 compliant bit stream are well known. The video bit stream generated by the video compression circuit 26 is stored in the rate buffer 28. The bit stream is then transmitted via a transmission channel 32 to one or more decoders which decode the received bit stream. Alternatively, the bit stream may be transmitted to an electronic or magnetic memory, a recordable optical disk or another suitable storage device.
The controller 30 controls the number of bits allocated by the video compression circuit 26 to the frames to be encoded. The controller 30 allocates bits to the frames to be encoded so as not to exceed the bandwidth in the channel 32 assigned to the encoding system 12 and so as to maintain certain limits on the occupancy of the rate buffer 28. This is turn prevents overflow and underflow conditions when the bit stream is received in a decoder buffer from the transmission channel 32 or from a storage device in which the bit stream has been previously stored.
The preprocessor 24 processes the video signal so that it may be compressed by the video compression circuit 26. For example, the preprocessor 24 may change the format of each frame including the number of horizontal or vertical pixels to meet parameters specified by the video compression circuit 16. In addition, the preprocessor 24 can detect scene changes or other changes which increase compression difficulty. A scene change increases the amount of bits required because predictive encoding cannot initially be used. If the preprocessor 24 detects a scene change, this information is communicated to the video compression circuit 26 and controller 30. A fade, representing a continuous decrease or increase in luminance level to or from black over several frames, can also cause difficulties for the video compression circuit 26 because it can cause a failure in motion compensated prediction. The preprocessor 24 can detect and inform the video compression circuit 26 of a fade so that the video compression circuit 26 can take appropriate precautions.
FIG. 2 shows a sequence of film frames at 24 frames per second labeled A, B, C, . . . and a corresponding sequence of video fields at 60 fields per second derived from frames A, B, C, . . . using the above-noted 3:2 pulldown technique. A telecine machine which performs 3:2 pulldown conversion alternates between generating three video fields and two video fields for successive film frames. When three video fields are generated for a given film frame, the third field is a repeat of the first field. Thus, as shown in FIG. 2, the first video field a.sub.1 is an odd field derived from the first film frame A, the second video field a.sub.2 is an even field derived from the film frame A, the third video field a.sub.3 is an odd field which is the same as a.sub.1 and is derived from the film frame A. The fourth video field b.sub.1 is an even field derived from the film frame B and the fifth video field b.sub.2 is an odd field derived from the film frame B. The sixth, seventh, and eighth video fields, c.sub.1, c.sub.2, c.sub.3, are even, odd, and even, respectively, and are derived from the film frame C, with c.sub.3 being a repeat of c.sub.1. The ninth and tenth video fields d.sub.1, d.sub.2 are odd and even, respectively and are derived from the film frame D. Thus, the number of fields per frame of video follows the 3,2,3,2,3,2, . . . pattern commonly referred to as a 3:2 pulldown pattern.
The 3:2 pulldown pattern may be interrupted in a variety of situations. For example, there may be an edit operation in which a new film segment is combined with an old film segment. The edit operation may produce the following pattern in which the location of the edit is indicated by an arrow: ##EQU1## In another situation, conventional video can be "spliced" into the 3:2 pulldown video sequence to form a pattern as follows: ##EQU2## This situation occurs when a commercial is inserted into a 3:2 pulldown pattern derived from film. In other situations, there can be a purposeful deviation from the conventional 3:2 pulldown pattern to produce an eye-appealing pan. Moreover, if slow motion is desired there may be repeat fields for optical reasons as well as repeat fields resulting from telecine machine operation.
The purpose of inverse telecine processing may thus be viewed as grouping fields into two-field frames and three-field frames by detecting repeat fields in the field sequence. The repeat fields in the three-field frames are then dropped so as not to waste encoder resources on the compression of repeat fields.
Conventional inverse telecine methods generally do not take full advantage of the availability of field statistics for surrounding fields in non real-time applications. As a result, a need exists for improved detection of repeat fields in a video sequence to be encoded.